#include "reg52.h" 

sbit KEY1 = P3^1;
sbit LED  = P2^0;

void delay(unsigned int i)
{
	while(i--);
}
void main()
{
  while(1)
	{
	  if(KEY1 == 0)
		{
		  delay(1000);
			if(KEY1 == 0)
			{
			  LED = 0;
			}
		}
	}
}